package test3_11;

import java.util.Arrays;

public class Test_splitting {
    public static void main(String[] args) {
        /*
        v={1,2,3,4,5,6} => v1={1,2,3} v2={4,5,6}
         */
        int[] v = {1, 2, 3, 4, 5, 6};
        int[] v1 = new int[3];
        int[] v2 = new int[3];
        for (int i = 0; i < v.length/2; i++) {
            v1[i] = v[i];
        }
        for (int i = v.length/2; i < v.length; i++) {
            v2[i-v.length/2]= v[i];
        }
        System.out.println(Arrays.toString(v1));
        System.out.println(Arrays.toString(v2));

    }
}
